<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Twitter-Like service</title>
<link rel="stylesheet" href="../css/style.css" />
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
</head>
<body>
<script type="text/javascript">
	$(document).ready(function(){
		$("#enter").click(function(){
			$("#message").css("display","none");
			$.post('/mobi.menu/loginController/login.do',
					{
						login: $("#login").val(),
						password: $("#password").val()
					}
				,function(data) {
					if (data=='Success')
						window.location.href = 'home.jsp';
					else 
						$("#message").css("display","inline");
					
			  	}
			);
		});

	});
</script>
	<div class="login">
	<label style="color: black; border-radius: 5px; font-size: 50pt; 
 			position: absolute; font-weight: bold; left: 100px;">&nbsp;mobi.menu&nbsp;</label> 
		<ul>
			<li>login</li>
			<li><input type="text" id="login" /></li>
			</br>
			<li >password</li>
			<li><input type="password" id="password" /></li>
			</br>
			<li></li>
			<li><input type="button" value="enter" id="enter" /></li>
			</br>
			<li id="message" style="display: none">Username/password is incorrect!</li>
		</ul>
	</div>

</body>
</html>